
#include "hal_interrupt.h"
#include "jxos_public.h"
#include "../SRTnet/srtnet_public.h"

void Timer0_ISR_callback_handler(void);
void Timer1_ISR_callback_handler(void);
void jxos_prepare_to_run_callback_handler(void);

void sys_debug_print_task_hal_init_callback_handler(void);
uint8_t sys_debug_print_task_send_finish_check_callback_handler(void);
void sys_debug_print_task_send_byte_callback_handler(uint8_t byte);
void sys_software_timer_task_hal_init_callback_handler(void);
void srtnet_comm_layer_task_hal_timer_init_callback_handler(void);

void jxos_hal_init(void)
{
	TIM0_IRQHandler_callback = Timer0_ISR_callback_handler;
	TIM1_IRQHandler_callback = Timer1_ISR_callback_handler;
	jxos_prepare_to_run_callback = jxos_prepare_to_run_callback_handler;
#if	(JXOS_SYS_SERVICE_DEBUG_PRINT_TASK_ENABLE == 1)
	sys_debug_print_task_hal_init_callback = sys_debug_print_task_hal_init_callback_handler;
	sys_debug_print_task_send_finish_check_callback = sys_debug_print_task_send_finish_check_callback_handler;
	sys_debug_print_task_send_byte_callback = sys_debug_print_task_send_byte_callback_handler;
#endif
	sys_software_timer_task_hal_init_callback = sys_software_timer_task_hal_init_callback_handler;
	srtnet_comm_layer_task_hal_init_callback = srtnet_comm_layer_task_hal_timer_init_callback_handler;
}

void  onoff_light_task_init(void);
void jxos_user_task_init(void)
{
	srtnet_comm_layer_task_init();
	srtnet_app_layer_task_init();
	onoff_light_task_init();
}
